<link rel="stylesheet" href="{__GOUGU__}/layui/css/layui.css" media="all">
<html style="height: 100%;"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

	<title>{:get_system_config('web','admin_title')}</title>
	<link rel="stylesheet" type="text/css" href="{__GOUGU__}/css/login.css">


	<!--<script type="text/javascript" language="javascript">
		function g(o){return document.getElementById(o);}
		function HoverLi(n){
			for(var i=1;i<=2;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';
		}
	</script>-->

</head>
<body style="background:url({__ADMIN__}/images/bg1.jpg) no-repeat;height: 100%;">
<div class="wraper">
	<div class="logo">
		<!--<img src="images/logo.png" />-->
		<p>{:get_system_config('web','admin_title')}</p>
	</div>
	<div class="ad_img">
		<!--	<div class="ad_img_l">
                <img src="./欢迎来到某某省某某卫生监督所版权所有_files/login.jpg">
            </div>-->
		<div class="ad_img_r">
			<!--选项卡-->
			<div id="tb_" class="tb_">
				<ul>
					<li id="tb_1" class="hovertab" >
						<span>密码登录</span>
					</li>
				</ul>
			</div>


			<div class="ctt">
				<div class="bottom">
					<form class="layui-form" id="gougu-login">
						<div class="layui-form-item">
							<input type="text" name="username" lay-verify="required" value="" placeholder="请输入账户" lay-reqText="请输入账户" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-form-item">
							<input type="password" name="password" lay-verify="required" value="" placeholder="请输入密码" lay-reqText="请输入密码" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-form-item">
							<div class="layui-input-inline" style="width:158px;">
								<input type="text" name="captcha" lay-verify="required" placeholder="验证码" lay-reqText="请输入验证码" autocomplete="off" class="layui-input">
							</div>
							<div class="layui-input-inline captcha_img yanzhengma" style="width:142px; height:44px; margin-right:0">
								{:captcha_img()}
								<input type="hidden" value="{:make_token()}"/>
							</div>
						</div>

						<button id="login-submit" class="layui-btn layui-btn-fluid layui-bg-cyan" lay-submit lay-filter="login-submit">登入系统</button>
					</form>
				</div>
			</div>
			<!--<input class="login2" type="button" name="btn5" id="btn5" value="登录">-->
			<!--<button id="login-submit" class="login2" lay-submit lay-filter="login-submit">登入系统</button>

            <div class="zhuceq">
            <p class="fl">忘记密码？</p><p class="fr">去注册&gt;&gt;</p>-->

			<div class="zhuceq">
				<a class="fr"   style="color: #079852;" href="/admin/login/forget">忘记密码？</a>
			</div>

		</div>

	</div>

	<div class="footer">
		<div class="foot">
			<p>{:get_system_config('web','copyright')}</p>
		</div>
	</div>
</div>



</body></html>

<script src="{__GOUGU__}/layui/layui.js"></script>
<script type="text/javascript">
	layui.use(['form'], function() {
		var form = layui.form,
				layer = layui.layer,
				$ = layui.$;
		form.on('submit(login-submit)', function(data) {
			$.ajax({
				url: "/admin/login/login_submit",
				data: $('#gougu-login').serialize(),
				type: 'post',
				async: false,
				success: function(res) {
					layer.tips(res.msg, '#login-submit');
					if (res.code === 0) {
						setTimeout(function() {
							//	parent.document.location.reload();
							parent.document.location.href="{:url('/admin/index')}";
						}, 1500);
					} else {
						$('[alt="captcha"]').click();
					}
				}
			})
			return false;
		});
	});
</script>